package com.qf.xxx.job;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import org.springframework.stereotype.Component;

@Component
public class MyJobDetail implements SimpleJob {

    @Override
    public void execute(ShardingContext shardingContext) {
        switch (shardingContext.getShardingItem()) {
            case 0:
                System.out.println("任务00000000");
                break;
            case 1:
                System.out.println("任务11111111");
                break;
            case 2:
                System.out.println("任务22222222");
                break;
        }
    }
}
